package us.wili.dev.client.model.rsp;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import us.wili.dev.common.model.IdLongToStrSerializer;
import us.wili.dev.model.entity.Shipaddress;

public class ShipAddressRsp {
    @ApiModelProperty(value="id")
    @JSONField(serializeUsing = IdLongToStrSerializer.class)
    private Long id;

    @ApiModelProperty(value="用户id")
    private Long userid;

    @ApiModelProperty(value="收货地址")
    private String address;

    @ApiModelProperty(value="详细地址")
    private String addressdeta;

    @ApiModelProperty(value="收件人")
    private String shipname;

    @ApiModelProperty(value="联系方式")
    private String shipphone;

    @ApiModelProperty(value="0:默认地址 1:非默认地址")
    private Integer defaultaddress;

    public static ShipAddressRsp address(Shipaddress shipaddress){
        ShipAddressRsp rsp =new ShipAddressRsp();
        rsp.setId(shipaddress.getId());
        rsp.setShipname(shipaddress.getShipname());
        rsp.setAddress(shipaddress.getAddress());
        rsp.setShipphone(shipaddress.getShipphone());
        rsp.setDefaultaddress(shipaddress.getDefaultaddress());
        rsp.setAddressdeta(shipaddress.getAddressDeta());
        return rsp;
    }

    public String getAddressdeta() {
        return addressdeta;
    }

    public void setAddressdeta(String addressdeta) {
        this.addressdeta = addressdeta;
    }

    public Integer getDefaultaddress() {
        return defaultaddress;
    }

    public void setDefaultaddress(Integer defaultaddress) {
        this.defaultaddress = defaultaddress;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getShipname() {
        return shipname;
    }

    public void setShipname(String shipname) {
        this.shipname = shipname;
    }

    public String getShipphone() {
        return shipphone;
    }

    public void setShipphone(String shipphone) {
        this.shipphone = shipphone;
    }
}
